package dongtaidaili;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class Proxy1 implements InvocationHandler{
	private Operation operation;
	public Proxy1(Operation operation){
		this.operation=operation;
	}
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("代理前");
		Object obj=method.invoke(operation, args);
		System.out.println("代理后");
		return obj;
	}

}
